import { dataMapper } from '../../../src/utils/publicFun.ts'

const getTrademark = () => {
  return [
    {
      countId: null,
      current: 1,
      hitCount: false,
      pageSize: 3,
      optimizeCountSql: true,
      orders: [],
      pages: 3,
      total: 10,
      records: [
        {
          id: 1,
          createTime: '2021-10-18 10:22:48',
          tmName: '花花公子',
          title: '上衣',
          logoUrl:
            'https://imgservice.suning.cn/uimg1/b2c/image/ZD_qqxO9ZnKbl_gyl4eNEA.jpg_800w_800h_4e',
          update: '2021-10-20 10:22:48',
        },
        {
          id: 2,
          createTime: '2021-10-18 10:22:48',
          tmName: 'konrrz',
          title: '休闲裤',
          logoUrl:
            'https://img1.baidu.com/it/u=989319213,2020229828&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=621',
          update: '2021-10-20 10:22:48',
        },
        {
          id: 3,
          createTime: '2021-10-18 10:22:48',
          tmName: 'Brioni',
          title: '高跟鞋',
          logoUrl:
            'https://s5.mogucdn.com/p2/160830/108973089_2g823h1fcb99jjgk3367beekla1hh_640x960.jpg',
          update: '2021-10-20 10:22:48',
        },
      ],
      token: 'Admin Token',
    },
    {
      countId: null,
      current: 2,
      hitCount: false,
      pageSize: 3,
      optimizeCountSql: true,
      orders: [],
      pages: 3,
      total: 10,
      records: [
        {
          id: 1,
          createTime: '2021-10-18 10:22:48',
          tmName: '华为',
          title: '华为mate60',
          logoUrl:
            'https://pic4.zhimg.com/100/v2-c068637dc116d5025d362392080e6b77_r.jpg',
          update: '2021-10-18 10:22:48',
        },
        {
          id: 2,
          createTime: '2021-10-18 10:22:48',
          tmName: '恒源祥',
          title: '翻领系带收腰长裙连衣裙',
          logoUrl:
            'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fi1%2F908948999%2FO1CN01JS81Wd2GLas2zoeXO_%21%21908948999.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1716576760&t=c6b774e538cdf5945578b23241f988cc',
          update: '2021-10-18 10:22:48',
        },
        {
          id: 3,
          createTime: '2021-10-18 10:22:48',
          tmName: '耐克',
          title: '休闲鞋',
          logoUrl:
            'https://img11.360buyimg.com/n1/jfs/t1/246542/16/5226/36655/66110cf3F8aba38bd/5b05b79fc9815bef.jpg',
          update: '2021-10-18 10:22:48',
        },
      ],
      token: 'Admin Token',
    },
    {
      countId: null,
      current: 3,
      hitCount: false,
      pageSize: 3,
      optimizeCountSql: true,
      orders: [],
      pages: 3,
      total: 10,
      records: [
        {
          id: 1,
          createTime: '2021-10-18 10:22:48',
          tmName: '花花公子',
          title: '商务皮鞋',
          logoUrl:
            'https://image.suning.cn/uimg/mcmp/tm/0010138806000000010058692901_1.jpg_800w_800h_4e',
          update: '2021-10-18 10:22:48',
        },
        {
          id: 2,
          createTime: '2021-10-18 10:22:48',
          tmName: 'Brioni',
          title: '秋冬低筒靴',
          logoUrl:
            'https://img2.baidu.com/it/u=103022815,1890384751&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500',
          update: '2021-10-18 10:22:48',
        },
        {
          id: 3,
          createTime: '2021-10-18 10:22:48',
          tmName: 'Brioni',
          title: '汉服',
          logoUrl:
            'https://ww1.sinaimg.cn/mw690/007YNGEGgy1h9cfk6bgadj310e1ls0x3.jpg',
          update: '2021-10-18 10:22:48',
        },
      ],
      token: 'Admin Token',
    },
    {
      countId: null,
      current: 4,
      hitCount: false,
      pageSize: 3,
      optimizeCountSql: true,
      orders: [],
      pages: 3,
      total: 10,
      records: [
        {
          id: 1,
          createTime: '2021-10-18 10:22:48',
          tmName: '夏季雪白连衣裙',
          title: 'Brioni',
          logoUrl:
            'https://s5.mogucdn.com/mlcdn/c45406/200416_7fg08013d2dh8iela5li5h0i30gal_640x960.jpg',
          update: '2021-10-18 10:22:48',
        },
      ],
      token: 'Admin Token',
    },
    {
      countId: null,
      current: 1,
      hitCount: false,
      pageSize: 4,
      optimizeCountSql: true,
      orders: [],
      pages: 3,
      total: 10,
      records: [
        {
          id: 1,
          createTime: '2021-10-18 10:22:48',
          tmName: '花花公子',
          title: '上衣',
          logoUrl:
            'https://imgservice.suning.cn/uimg1/b2c/image/ZD_qqxO9ZnKbl_gyl4eNEA.jpg_800w_800h_4e',
          update: '2021-10-20 10:22:48',
        },
        {
          id: 2,
          createTime: '2021-10-18 10:22:48',
          tmName: 'konrrz',
          title: '休闲裤',
          logoUrl:
            'https://img1.baidu.com/it/u=989319213,2020229828&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=621',
          update: '2021-10-20 10:22:48',
        },
        {
          id: 3,
          createTime: '2021-10-18 10:22:48',
          tmName: 'Brioni',
          title: '高跟鞋',
          logoUrl:
            'https://s5.mogucdn.com/p2/160830/108973089_2g823h1fcb99jjgk3367beekla1hh_640x960.jpg',
          update: '2021-10-20 10:22:48',
        },
        {
          id: 4,
          createTime: '2021-10-18 10:22:48',
          tmName: '华为',
          title: '华为mate60',
          logoUrl:
            'https://pic4.zhimg.com/100/v2-c068637dc116d5025d362392080e6b77_r.jpg',
          update: '2021-10-18 10:22:48',
        },
      ],
      token: 'Admin Token',
    },
    {
      countId: null,
      current: 2,
      hitCount: false,
      pageSize: 4,
      optimizeCountSql: true,
      orders: [],
      pages: 3,
      total: 10,
      records: [
        {
          id: 1,
          createTime: '2021-10-18 10:22:48',
          tmName: '恒源祥',
          title: '翻领系带收腰长裙连衣裙',
          logoUrl:
            'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fi1%2F908948999%2FO1CN01JS81Wd2GLas2zoeXO_%21%21908948999.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1716576760&t=c6b774e538cdf5945578b23241f988cc',
          update: '2021-10-18 10:22:48',
        },
        {
          id: 2,
          createTime: '2021-10-18 10:22:48',
          tmName: '耐克',
          title: '休闲鞋',
          logoUrl:
            'https://img11.360buyimg.com/n1/jfs/t1/246542/16/5226/36655/66110cf3F8aba38bd/5b05b79fc9815bef.jpg',
          update: '2021-10-18 10:22:48',
        },
        {
          id: 3,
          createTime: '2021-10-18 10:22:48',
          tmName: '花花公子',
          title: '商务皮鞋',
          logoUrl:
            'https://image.suning.cn/uimg/mcmp/tm/0010138806000000010058692901_1.jpg_800w_800h_4e',
          update: '2021-10-18 10:22:48',
        },
        {
          id: 4,
          createTime: '2021-10-18 10:22:48',
          tmName: 'Brioni',
          title: '秋冬低筒靴',
          logoUrl:
            'https://img2.baidu.com/it/u=103022815,1890384751&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500',
          update: '2021-10-18 10:22:48',
        },
      ],
      token: 'Admin Token',
    },
    {
      countId: null,
      current: 3,
      hitCount: false,
      pageSize: 4,
      optimizeCountSql: true,
      orders: [],
      pages: 3,
      total: 10,
      records: [
        {
          id: 1,
          createTime: '2021-10-18 10:22:48',
          tmName: 'Brioni',
          title: '汉服',
          logoUrl:
            'https://ww1.sinaimg.cn/mw690/007YNGEGgy1h9cfk6bgadj310e1ls0x3.jpg',
          update: '2021-10-18 10:22:48',
        },
        {
          id: 2,
          createTime: '2021-10-18 10:22:48',
          tmName: '夏季雪白连衣裙',
          title: 'Brioni',
          logoUrl:
            'https://s5.mogucdn.com/mlcdn/c45406/200416_7fg08013d2dh8iela5li5h0i30gal_640x960.jpg',
          update: '2021-10-18 10:22:48',
        },
      ],
      token: 'Admin Token',
    },
  ]
}

export default [
  // 返回品牌管理数据
  {
    url: '/api/product/baseTrademark', //请求地址
    method: 'get', //请求方式
    response: (data) => {
      const { page, pageSize } = data.query
      const checkUser = getTrademark().find(
        (item) => item.current == page && item.pageSize == pageSize,
      )

      //没有用户返回失败信息
      if (!checkUser) {
        return { code: 201, message: data, ok: false, data: null }
      }
      //如果有返回成功信息
      return { code: 200, message: null, ok: true, data: checkUser }
    },
  },
]
